/* stylelint-disable */
:host {
  font-size: 14px;
  color: var(--text-secondary);
  min-height: var(--footer-height);
  box-sizing: border-box;

  --footer-logo-position: absolute;
  --footer-inner-position: static;
}

.TDesign-doc-footer {
  position: relative;
  height: calc(var(--footer-height) - 56px);
  padding-right: var(--content-padding-right);
  background-color: var(--bg-color-footer);
  box-shadow: var(--footer-box-shadow);

  &__inner {
    position: var(--footer-inner-position);
    margin: 0 auto;
    padding: 40px var(--content-padding-left-right);
    height: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    max-width: var(--content-max-width);
  }

  &__content {
    display: flex;
    flex-direction: row;
    column-gap: 24px;
    width: 100%;

    &-block {
      display: flex;
      flex-direction: column;
      min-width: 120px;

      .title {
        font-size: 14px;
        font-weight: 400;
        line-height: 22px;
        margin-top: 0;
        margin-bottom: 24px;
        color: var(--text-placeholder);
      }

      .link {
        cursor: pointer;
        text-decoration: none;
        color: var(--text-primary);
        font-size: 14px;
        line-height: 22px;
        margin-bottom: 16px;
        transition: all var(--anim-duration-base) linear;

        &:hover {
          color: var(--text-interactive);
        }
      }
    }
  }

  &__logos {
    display: inline-flex;
    align-items: center;
    row-gap: 32px;
    column-gap: 32px;
  }

  &__qrcode {
    width: 192px;
    padding: 16px;
    box-sizing: border-box;
    border-radius: 9px;
    background: var(--bg-color-code);
    border: 1px solid var(--component-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    right: 48px;
    top: 40px;

    &-title {
      margin: 0 0 4px;
      font-size: 16px;
      line-height: 24px;
      font-weight: bold;
      color: var(--text-primary);
    }

    &-desc {
      margin: 0;
      font-size: 14px;
      line-height: 22px;
      color: var(--text-secondary);
    }
  }
}

.TDesign-doc-footer__qrcode-trigger {
  background: linear-gradient(180deg, #4282ec 0%, var(--brand-main) 100%);
  width: 160px;
  height: 160px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px;
  box-sizing: border-box;
  box-shadow: 0 8px 8px 0 #0000001a;
  margin-bottom: 12px;

  > div {
    height: 48px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    color: var(--text-primary);

    :hover {
      color: var(--brand-main);
      font-weight: bold;
    }

    > div {
      background-color: var(--bg-color-container);
      border-radius: 3px;
      text-align: left;
      padding: 4px;
      display: flex;
      font-size: 12px;
      flex-direction: column;
      box-sizing: border-box;
      cursor: pointer;

      i {
        font-size: 20px;
        text-align: left;
      }
    }

    &:nth-child(1) {
      div {
        width: 48px;
      }
    }

    &:nth-child(2) {
      div {
        width: 74px;
      }
    }

    &:nth-child(3) {
      div {
        width: 152px;
      }
    }
  }
}

.TDesign-doc-footer__bottom {
  height: 56px;
  overflow: hidden;
  color: var(--text-placeholder);
  padding-right: var(--content-padding-right);
  background: var(--bg-color-secondaryfooter);

  .TDesign-doc-footer__inner {
    padding: 0 var(--content-padding-left-right);
    align-items: center;
    column-gap: 24px;
  }

  .TDesign-doc-footer__logos {
    position: var(--footer-logo-position);
    right: 48px;
    bottom: 0;
    height: 56px;
  }

  .logo {
    height: 34px;
    display: inline-flex;
    align-items: center;

    svg {
      transition: color .2s linear;
      color: var(--text-placeholder);
    }

    &:not(i):hover svg {
      color: var(--text-secondary);
    }
  }

  .copyright {
    margin: 0;
  }
}

@media screen and (max-width: 960px) {
  .TDesign-doc-footer {
    height: auto;
  }

  .TDesign-doc-footer__qrcode {
    position: unset;
  }

  .TDesign-doc-footer__content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    row-gap: 24px;

    .title {
      color: var(--text-primary);
      margin-bottom: 12px;
    }

    .link {
      color: var(--text-placeholder);
    }
  }

  .TDesign-doc-footer__bottom {
    height: 112px;

    .TDesign-doc-footer__inner {
      flex-direction: column-reverse;
      padding-top: 16px;
      padding-bottom: 16px;
    }

    .TDesign-doc-footer__logos {
      position: unset;
      height: auto;
    }

    .copyright {
      text-align: center;
    }
  }
}
